package com.guofeng.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;


import com.guofeng.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author guofeng
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    @Select("select url from sys_permission  per left join sys_role_permission srp  on per.id = srp.permission_id join sys_user_role sur on srp.role_id=sur.role_id  where sur.user_id = #{userId} ")
    List<String> getUserAuthByUserId(@Param("userId") Integer userId);
}